<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateClassifyTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('classify', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('enterprise_id') ->default(0)->comment('所属企业');
            $table->string('name')->comment('分类名');
            $table->string('desc')->comment('描述');
            $table->bigInteger('merchant_id')->default(0)->comment('商家id');
            $table->bigInteger('pid')->default(0)->comment('父级id');
            $table->string('type')->default('')->comment('分类类型：medicine药品,selling销售');
            $table->string('link_url')->default('')->comment('链接');
            $table->bigInteger('img_id')->default(0)->comment('图片id');
            $table->integer('status')->default(0)->comment('状态');
            $table->integer('sort')->default(1)->comment('排序');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
//        Schema::dropIfExists('classify');
    }
}
